package com.hdoit.ares.web.acti.modelconfig;
import com.hdoit.ares.web.acti.providers.ActiStateProvider;
import com.hdoit.ares.web.acti.providers.ActiTypeProvider;
import com.hdoit.ares.web.brokerage.providers.ConfirmStateProvider;
import com.hdoit.ares.web.ser.providers.GoodsCurrencyStateProvider;
import com.tennetcn.component.attribute.DateTimeAttribute;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      caochengmeng
 * @email       
 * @createtime  2018年03月10日 19:37:52
 * @comment
 */
public class ActivityConfig extends ModelMetadataAttributeConfiguration{
    public ActivityConfig(){
        this.setProperty("name")
            .hasAttribute(new DisplayNameAttribute("活动名称"));

        this.setProperty("startDate")
            .hasAttribute(new DisplayNameAttribute("活动开始时间"))
            .hasAttribute(new DateTimeAttribute());

        this.setProperty("endDate")
            .hasAttribute(new DisplayNameAttribute("活动结束时间"))
            .hasAttribute(new DateTimeAttribute());

        this.setProperty("object")
            .hasAttribute(new DisplayNameAttribute("活动对象"));

        this.setProperty("reward")
            .hasAttribute(new DisplayNameAttribute("活动奖金"));
        
        this.setProperty("rewardCurrency")
    		.hasAttribute(new DisplayNameAttribute("奖金币种"))
    		.hasAttribute(new DropDownListAttribute(new GoodsCurrencyStateProvider()));
        
        this.setProperty("actiUrl")
        	.hasAttribute(new DisplayNameAttribute("活动链接"));

        this.setProperty("createUserName")
        	.hasAttribute(new DisplayNameAttribute("活动创建人"));

        this.setProperty("exchange")
            .hasAttribute(new DisplayNameAttribute("活动奖励兑换"));

        this.setProperty("content")
            .hasAttribute(new DisplayNameAttribute("活动说明"));

        this.setProperty("actiImg")
            .hasAttribute(new DisplayNameAttribute("活动图片"));
        
        this.setProperty("actiType")
    		.hasAttribute(new DisplayNameAttribute("活动类型"))
    		.hasAttribute(new DropDownListAttribute(new ActiTypeProvider()));
        
        this.setProperty("actiState")
        	.hasAttribute(new DisplayNameAttribute("活动状态"))
        	.hasAttribute(new DropDownListAttribute(new ActiStateProvider()));
        
        this.setProperty("confirmState")
    		.hasAttribute(new DisplayNameAttribute("确认状态"))
    		.hasAttribute(new DropDownListAttribute(new ConfirmStateProvider()));
    }
}